package com.ws.user.service.impl;

import com.ws.common.exception.BaseRuntimeException;
import com.ws.common.exception.MyBaseCodeEnum;
import com.ws.dao.UserDao;
import com.ws.domain.dto.UserDTO;
import com.ws.entity.User;
import com.ws.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by WS on 2018/1/23.
 */
@Service
@Transactional
public class UserServiceImpl implements UserService{

    @Override
    public List<User> queryUserList(User user) {
        return userDao.queryUserList(user);
    }

    @Override
    public Page<User> queryUserPage(User user, Pageable pageable) {
        return userDao.queryUserPage(user, pageable);
    }

    @Override
    public void insertUser(User user) {
        userDao.insertUser(user);
    }


    @Autowired
    private UserDao userDao;
}
